<!-- 水产苗种产地检疫工作记录单 -->
<template>
	<view style="width: 100%;">
		<uni-list>
			<view style="text-align: center;font-size:105% ;">基本情况</view>
			<uni-list-item :show-arrow="false" title="编号" :note="datas.recCode" />
			<uni-list-item :show-arrow="false" title="检疫时间" :note="datas.decTime|dateFormat" />
			<uni-list-item :show-arrow="false" title="货主姓名" :note="datas.shipperName" />
			<uni-list-item :show-arrow="false" title="联系电话" :note="datas.decMobeltel" />
			<uni-list-item :show-arrow="false" title="身份证号" :note="datas.decCard" />
			<uni-list-item :show-arrow="false" title="动物种类" :note="datas.breedName" />
			<uni-list-item :show-arrow="false" title="规格及数量" :note="datas.specOrNum" />
			<uni-list-item :show-arrow="false" title="用途" :note="datas.decPurpose" />
			<uni-list-item :show-arrow="false" title="捕获地点" :note="datas.decAddress" />
			<uni-list-item :show-arrow="false" title="检疫地点" :note="datas.accAddress" />
			<uni-list-item :show-arrow="false" title="动物来源" :note="datas.decSource" />
			<uni-list-item :show-arrow="false" title="起运地点" :note="datas.locDeparture" />
			<uni-list-item :show-arrow="false" title="到达地点" :note="datas.locArrival" />
			<uni-list-item :show-arrow="false" title="运载工具牌号" :note="datas.carNo" />
			<view style="text-align: center;font-size:105% ;margin-top: 20px;">检验材料及疫情调查</view>
			<uni-list-item :show-arrow="false" title="《水域滩涂养殖证》等权证号" :note="datas.warrant" />
			<uni-list-item :show-arrow="false" title="或者相关协议" :note="datas.agreementName" />
			<uni-list-item :show-arrow="false" title="《水产苗种生产许可证》证号" :note="datas.plNumber" />
			<uni-list-item :show-arrow="false" title="过去12个月内引种来源地《动物检疫合格证明》证号" :note="datas.aqCertificate" />
			<uni-list-item :show-arrow="false" title="《水产养殖管理记录》是否符合要求" :note="datas.cultureRecord" />
			<uni-list-item :show-arrow="false" title="过去12个月内相关水生动物疫病情况" :note="datas.epidemicSituation" />
			<uni-list-item :show-arrow="false" title="与其他养殖场所是否有物理隔离设施" :note="datas.barrierFacility" />
			<view style="text-align: center;font-size:105% ;margin-top: 20px;">临床健康检查</view>
			<uni-list-item :show-arrow="false" title="检疫对象" :note="datas.disease" />
			<uni-list-item :show-arrow="false" title="群体检查" :note="datas.groupResult" />
			<uni-list-item :show-arrow="false" title="外观" :note="datas.singleAppearance" />
			<uni-list-item :show-arrow="false" title="解剖" :note="datas.singleAnatomy" />
			<uni-list-item :show-arrow="false" title="显微镜检查" :note="datas.singleMicroscope" />
			<uni-list-item :show-arrow="false" title="不正常情况说明" :note="datas.singleResult" />
			<uni-list-item :show-arrow="false" title="检疫盒快检" :note="datas.reagentResult" />
			<view style="text-align: center;font-size:105% ;margin-top: 20px;">水质环境检查</view>
			<uni-list-item :show-arrow="false" title="水温" :note="datas.wp" />
			<uni-list-item :show-arrow="false" title="溶解氧" :note="datas.disso" />
			<uni-list-item :show-arrow="false" title="酸碱度" :note="datas.ph" />
			<uni-list-item :show-arrow="false" title="氨氮" :note="datas.nh" />
			<uni-list-item :show-arrow="false" title="亚硝酸盐" :note="datas.no2" />
			<uni-list-item :show-arrow="false" title="化学耗氧量" :note="datas.o2" />
			<view style="text-align: center;font-size:105% ;margin-top: 20px;">检疫结果</view>
			<uni-list-item :show-arrow="false" title="实验室检测" :note="datas.laboratory" />
			<uni-list-item :show-arrow="false" title="检测情况" :note="datas.quaState"/>
			<uni-list-item :show-arrow="false" title="动物检疫合格证明" :note="datas.qualificationType+datas.certification" />
			
			<view style="text-align: center;font-size:105% ;margin-top: 20px;">检疫人员签字</view>
			<uni-list-item :show-arrow="false" title="水生动物卫生监督所"  :note="datas.authority"/>
			<uni-list-item :show-arrow="false" title="渔业官方兽医签字" note=" " />
			<uni-list-item :show-arrow="false" title="渔业官方兽医证件号" note=" " />
		</uni-list>
	</view>
</template>

<script>
import uniSection from '@/components/uni-section/uni-section.vue';
import uniList from '@/components/uni-list/uni-list.vue';
import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
import loginjs from '@/login.js'
import {
		mapState
	} from 'vuex'
export default {
	computed: mapState(['baseUrl']),
	components: {
		uniSection,
		uniList,
		uniListItem
	},
	data() {
		return {
			datas: {
			},
			Authorization:null
		};
	},
	methods: {
		onLoad(option) {
			this.Authorization = loginjs.getAuthorization();
			this.getList(option.id)
		},
		getList(id) {
			uni.request({
				method: "GET",
				url: this.baseUrl + 'api/quarantine/workRecord/' + id,
				header: {
					"Authorization": this.Authorization,
				},
				success: (res) => {
					this.datas = res.data.data
					if(this.datas.cultureRecord==1){
						this.datas.cultureRecord='符合'
					}else{
						this.datas.cultureRecord='不符合'
					}
					if(this.datas.barrierFacility==1){
						this.datas.barrierFacility='有'
					}else{
						this.datas.barrierFacility='无'
					}
					var diseaseTemp=JSON.parse(this.datas.disease)
					this.datas.disease=''
					diseaseTemp.forEach((data,i)=>{
						if(i!=diseaseTemp.length-1){
						this.datas.disease+=data+'/'	
						}else{
							this.datas.disease+=data
						}
					})
					if(this.datas.groupResult==1){
							this.datas.groupResult='正常'
					}else{
							this.datas.groupResult='不正常'
					}
					if(this.datas.singleAppearance==1){
						this.datas.singleAppearance='正常'
					}else{
						this.datas.singleAppearance='不正常'
					}
					if(this.datas.singleAnatomy==1){
						this.datas.singleAnatomy='正常'
					}else{
						this.datas.singleAnatomy='不正常'
					}
					if(this.datas.singleMicroscope==1){
						this.datas.singleMicroscope='正常'
					}else{
						this.datas.singleMicroscope='不正常'
					}
					
					if(this.datas.reagentResult==1){
						this.datas.reagentResult='正常'
					}else{
						this.datas.reagentResult='不正常'
					}
					
					if(this.datas.laboratory==1){
						this.datas.laboratory='需要'
					}else{
						this.datas.laboratory='不需要'
					}
					
					if(this.datas.quaState==1){
						this.datas.quaState='合格'
					}else{
						this.datas.quaState='不合格'
					}
					if(this.datas.qualificationType==1){
						this.datas.qualificationType='出具合格证,'
					}else{
						this.datas.qualificationType='更换合格证,原证号:'
					}
					if(this.datas.certification==1){
						this.datas.certification='动物A证'
					}else if(this.datas.certification==2){
						this.datas.certification='动物B证'
					}
					
					console.log(this.datas)
				}
			})
		}
	}
};
</script>

<style>

</style>
